<?php

use Biz\service\trade\Cart as sCart;

/**
 * @deprecated
 */
class UpdateBuyNumAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_VISITOR;

    public function main()
    {
        $skuId = $this->getRequest()->getPost('sku_id');
        $buyNum = $this->getRequest()->getPost('buy_num');
        $currentBuyNum = $this->getRequest()->getPost('current_buy_num');


        $result = sCart::updateBuyNum(($this->uid > 0) ? $this->uid : $this->vid, $skuId, $buyNum, $currentBuyNum, $this->appType);

        $this->setSuccess($result);

    }
}